package com.design_mode;

/**
 * Created by dustaple on 7/31/14.
 */
public interface BuilderPattern {
    void setIngredient();

    Car produceCar();
}

class Car {

}

class BMWBuilder implements BuilderPattern {
    @Override
    public void setIngredient() {

    }

    @Override
    public Car produceCar() {
        return null;
    }
}

class BenziBuilder implements BuilderPattern {
    @Override
    public void setIngredient() {

    }

    @Override
    public Car produceCar() {
        return null;
    }
}

class Director {
    BuilderPattern builderPattern = new BMWBuilder();

    Car getCar() {
        builderPattern.setIngredient();
        return builderPattern.produceCar();
    }
}

